@import "../../styles/index";
.dnn-page-picker {
    * {
        box-sizing: border-box;
    }
    position: relative;
    display: inline-block;
    cursor: pointer;
    box-sizing: border-box;
    .page-picker-search {
        display: block;
        height: 34px;
        input[type="search"] {
            border-radius: 0px;
        }
    }
    .dropdown-icon {
        position: absolute;
        width: 13px;
        height: 13px;
        right: 10px;
        top: 11px;
        svg {
            fill: var(--dnn-color-foreground-light, @rollingStone);
        }
    }
    .collapsible-label {
        cursor: pointer;
        font-family: inherit;
        position: relative;
        width: 100%;
        font-size: 13px;
        padding: 10px 40px 8px 15px;
        box-sizing: border-box;
        border: none;
        color: var(--dnn-color-foreground, @bulgarianRose);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .collapsible-content {
        position: absolute;
        padding: 0;
        top: 38px;
        width: 100%;
        box-sizing: border-box;
        background-color: var(--dnn-color-background, @white);
        z-index: 1000;
        box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.2);
        border: 0px;
        visibility: hidden;
        &.open{
            visibility:visible;
        }
    }
    .page-picker-content {
        >div {
            padding: 21px 21px 29px;
        }
        .pages-container {
            padding: 8px 15px;
            ul {
                padding: 0 15px;
                list-style: none;
                font-size: 13px;
                color: var(--dnn-color-foreground, @rollingStone);
                li {
                    font-size: 15px;
                    position: relative;
                    &.has-children.closed > ul {
                        max-height: 0;
                        opacity: 0;
                    }
                    .arrow-icon {
                        svg {
                            position: absolute;
                            left: -18px;
                            fill: var(--dnn-color-foreground, @mountainMist);
                            width: 15px;
                            height: 15px;
                        }
                    }
                    .child-pages {
                        >li {
                            margin-top: 0px;
                        }
                        &.opened {
                            >li {
                                margin-top: 7px;
                            }
                        }
                    }
                    .page-value {
                        >div {
                            font-size: 15px;
                            text-indent: 20px;
                            line-height: 16px;
                            svg {
                                width: 16px;
                                height: 16px;
                                fill: var(--dnn-color-foreground, @mountainMist);
                                position: absolute;
                                left: 0;
                            }
                            &.page-icon {
                                svg {
                                    left: 20px;
                                }
                            }
                            &.text-with-page-icon {
                                text-indent: 40px;
                            }
                            &.no-icon {
                                text-indent: 0px;
                            }
                            &:hover {
                                color: var(--dnn-color-primary, @curiousBlue);
                                svg {
                                    fill: @curiousBlue;
                                }
                            }
                        }
                        &.selected {
                            color: var(--dnn-color-primary, @curiousBlue);
                            svg {
                                fill: var(--dnn-color-primary, @curiousBlue);
                            }
                        }
                        &.non-selectable {
                            cursor: not-allowed;
                            >div {
                                &:hover {
                                    color: var(--dnn-color-foreground-light, @rollingStone);
                                    svg {
                                        fill: var(--dnn-color-foreground-light, @rollingStone);
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        .count {
            font-size: 12px;
            color: @rollingStone;
            padding-top: 10px;
        }
        input[type="search"] {
            border: 1px solid var(--dnn-color-foreground-light, @alto) !important;
            margin-bottom: 10px;
            padding-right: 30px;
            &:focus {
                outline: none;
                border: 1px solid @curiousBlue !important;
            }
        }
    }
    &.disabled {
        background: @mercury;
        color: @mountainMist;
        svg {
            fill: @mountainMist;
        }
        cursor: not-allowed;
    }
    &.open {
        .collapsible-content {
            transition: .5s border;
            transition-delay: 0.3s;
            background: @white;
            border: 1px solid @alto;
            margin-top: 3px;
        }
        &.with-border {
            border: 1px solid var(--dnn-color-primary, @curiousBlue);
        }
    }
    &.with-border {
        border: 1px solid var(--dnn-color-foreground-light, @mountainMist);
        border-radius: var(--dnn-controls-radius, 0);
        .collapsible-content {
            margin-top: 0;
            &.open {
                border: 1px solid var(--dnn-color-foreground-light, @alto);
                border-top: none;
            }
        }
        &.disabled {
            border: 1px solid var(--dnn-color-neutral, @mercury);
        }
    }
}